package com.robusta.spreadsheet.model.impl;

import com.robusta.spreadsheet.model.*;
import com.robusta.spreadsheet.model.exception.WorkbookException;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;

/**
 */
public abstract class RobustaWorkbookFactory {
    public static Workbook newWorkbook(org.apache.poi.ss.usermodel.Workbook workbook, WorkbookTemplate template) throws WorkbookException {
        return new RobustaWorkbook(workbook, template);
    }
    
    public static Worksheet newWorksheet(Workbook workbook, Sheet sheet, WorksheetTemplate template) throws WorkbookException {
        return new RobustaWorksheet(workbook, sheet, template);
    }
    
    public static SheetHeaders newSheetHeaders(Row headerRow, WorksheetTemplate worksheetTemplate) {
        return new RobustaSheetHeaders(headerRow, worksheetTemplate);
    }

    public static com.robusta.spreadsheet.model.Row newRow(Worksheet sheet, Row row, SheetHeaders sheetHeaders, WorksheetTemplate template) throws WorkbookException {
        return new RobustaRow(sheet, row, sheetHeaders, template);
    }

    public static com.robusta.spreadsheet.model.Cell newCell(com.robusta.spreadsheet.model.Row row, Cell cell, HeaderCell headerCell) {
        return new RobustaCell(row, cell, headerCell);
    }
}
